//
//  WKTableViewCell.m
//  WeKeTang
//
//  Created by ichina on 2017/8/24.
//  Copyright © 2017年 Dezhi Tiancheng Education Technology (Beijing) Co. Ltd. All rights reserved.
//

#import "WKTableViewCell.h"

@implementation WKTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    for (UIView *view in self.subviews) {
        if([view isKindOfClass:[UIScrollView class]]) {
            ((UIScrollView *)view).delaysContentTouches = NO;
            break;
        }
    }
    //栅格化 在屏幕滚动时，只显示图像
    self.layer.shouldRasterize = YES;
    //栅格化，必须指定分辨率，否则默认使用 * 1，生成图像！
    self.layer.rasterizationScale = [UIScreen mainScreen].scale;
    //异步绘制！如果 cell 比较复杂，可以使用
    self.layer.drawsAsynchronously = YES;
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.backgroundView.backgroundColor = [UIColor clearColor];
    self.contentView.backgroundColor = [UIColor clearColor];
    self.backgroundColor = [UIColor clearColor];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return self;
}

@end
